Page({
    data:{
        title:"来日方长",
        time:"2016-09-12",
        singer:"薛之谦",
        url:"http://p1.music.126.net/hllgYrXUqJL5lBumtPDYag==/3431575800454101.jpg?param=177y177",
        list:[
            {
                id:429450375,
                videoSrc:"http://link.hhtjim.com/163/429450375.mp3",
                songname:"来日方长",
                name:"薛之谦 / 黄龄",
            }
        ]
    },
    tomusic(event) {
        const item = event.currentTarget.dataset.item; // 获取当前点击的数据项
        console.log(item);
        const { id, url,songname,name } = item; // 从数据项中解构出 id 和 url
        console.log(id,url);
        wx.navigateTo({
            url: `/pages/music/music?id=${id}&url=${encodeURIComponent(url)}&songname=${songname}&name=${name}`, // 对 url 进行编码
        });
    }
})